#!/bin/sh
#使用jar部署的脚本，待测试
startServer(){
	if test -e $1".log"
	then
	mv $1".log" $1"_bk.log"
	fi
	nohup java -jar $1.jar >/dev/null 2>&1 &
}

servers=("registry" "config" "master" "web" "testcase")

for loop in ${servers[@]}
do
startServer$loop
#休眠时间根据具体情况调整，需要保证大于所有服务启动的最大时间
sleep 2m
cat $loop".log" | grep "JVM running for"
if test -z $?
then
exit 1
fi
done